<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<div class="header">
    <div class="container">
        <div class="logo">
            <a href="${pageContext.request.contextPath}/"><img src="${pageContext.request.contextPath}/static/home/images/logo1.png" alt=""></a>
        </div>
        <span class="menu"> Menu</span>

        <!--在这里添加菜单-->
        <div class="banner-top">
            <ul class="nav banner-nav">
                <li><a href="${pageContext.request.contextPath}/">主页</a></li>
                <% if(request.getSession().getAttribute("type") == null){%>
                <li><a href="${pageContext.request.contextPath}/search.action">职位搜索</a></li>
                <% }else if(request.getSession().getAttribute("type").equals("0")){ %>
                <li><a href="${pageContext.request.contextPath}/home/job/search.action">职位搜索</a></li>
                <li><a href="${pageContext.request.contextPath}/home/resume/index.action">我的简历</a></li>
                <li><a href="${pageContext.request.contextPath}/home/customer/personal.action">信息维护</a></li>
                <li><a href="${pageContext.request.contextPath}/home/customer/changePsd.action">修改密码</a></li>
                <% }else if(request.getSession().getAttribute("type").equals("1")){ %>
                <li class="dropdown1"><a class="down-scroll">职位管理</a>
                    <ul class="dropdown2">
                        <li><a href="${pageContext.request.contextPath}/home/job/create.action">新职位发布</a></li>
                        <li><a href="${pageContext.request.contextPath}/home/tag/index.action">职位标签管理</a></li>
                        <li><a href="${pageContext.request.contextPath}/home/job/index.action">职位列表管理</a></li>
                    </ul>
                </li>
                <li><a href="${pageContext.request.contextPath}/home/job/manager.action">简历管理</a></li>
                <li><a href="${pageContext.request.contextPath}/home/resume/search.action">简历搜索</a></li>
                <li><a href="${pageContext.request.contextPath}/home/company/info_view.action">信息维护</a></li>
                <li><a href="${pageContext.request.contextPath}/home/company/changePsd.action">修改密码</a></li>
                <% } %>
                <% if(request.getSession().getAttribute("fullname") == null){%>
                <li class="pull-right"><a href="${pageContext.request.contextPath}/loginPage.action"><i class="fa fa-user">&nbsp;登录</i></a></li>
                <% }else{ %>
                <li class="pull-right"><a href="${pageContext.request.contextPath}/logout.action"><i class="fa fa-power-off"
                >&nbsp;退出登录</i></a></li>
                <% } %>
                <% if(request.getSession().getAttribute("type")!=null && request.getSession().getAttribute("type").equals("0")){ %>
                <li class="dropdown1 pull-right"><a class="down-scroll"><i class="fa fa-envelope" style="font-size: large">${totalCount}</i></a>
                    <ul class="dropdown2">
                        <li><span>你有${totalCount}条新消息</span></li>
                        <c:forEach items="${inviteActivities}" var="activity">
                        <li >
                            <a href="${pageContext.request.contextPath}/home/customer/mail_box.action">
                                <div class="message-info">
                                    <span >${activity.company.company_name}</span>
                                    <div >${activity.date_added_string}</div>
                                    <div class="message-content">邀请您参加"${activity.invite.job.job_name}"的面试</div>
                                </div>
                            </a>
                        </li>
                        </c:forEach>
                        <c:forEach items="${deliveryActivities}" var="activity">
                            <li >
                                <a href="${pageContext.request.contextPath}/home/customer/mail_box.action">
                                    <div class="message-info">
                                        <span >${activity.company.company_name}</span>
                                        <div >${activity.date_added_string}</div>
                                        <div class="message-content">Hr已将您投递的"${activity.delivery.job.job_name}"岗位简历状态更改为<c:if test="${activity.status == 0}">"待处理"</c:if><c:if test="${activity.status == 1}">"通过"</c:if><c:if test="${activity.status == 2}">"不通过"</c:if><c:if test="${activity.status == 3}">"安排面试"</c:if></div>
                                    </div>
                                </a>
                            </li>
                        </c:forEach>
                        <li class="topborder"><a href="${pageContext.request.contextPath}/home/customer/mail_box.action">Check all messages <i class="fa fa-angle-right"></i></a></li>
                    </ul>
                </li>
                <% } %>
                <% if(request.getSession().getAttribute("type")!=null && request.getSession().getAttribute("type").equals("1")){ %>
                <li class="dropdown1 pull-right"><a class="down-scroll"><i class="fa fa-envelope" style="font-size: large">${totalCount}</i></a>
                    <ul class="dropdown2">
                        <li><span>你有${totalCount}条新消息</span></li>
                        <c:forEach items="${deliveryActivities}" var="activity">
                            <li >
                                <a href="${pageContext.request.contextPath}/home/company/mail_box.action">
                                    <div class="message-info">
                                        <span >${activity.customer.fullname}</span>
                                        <div >${activity.date_added_string}</div>
                                        <div class="message-content">投递了"${activity.delivery.job.job_name}"岗位，请尽快处理！</div>
                                    </div>
                                </a>
                            </li>
                        </c:forEach>
                        <c:forEach items="${inviteActivities}" var="activity">
                            <li >
                                <a href="${pageContext.request.contextPath}/home/company/mail_box.action">
                                    <div class="message-info">
                                        <span >${activity.customer.fullname}</span>
                                        <div >${activity.date_added_string}</div>
                                        <div class="message-content"><c:if test="${activity.status == 0}">还未接受</c:if><c:if test="${activity.status == 1}">接受了</c:if><c:if test="${activity.status == 2}">拒绝了</c:if>您邀请的"${activity.invite.job.job_name}"岗位。<c:if test="${activity.status == 1}">赶紧去安排面试吧！</c:if><c:if test="${activity.status == 2}">赶快寻找下一个人才吧！</c:if></div>
                                    </div>
                                </a>
                            </li>
                        </c:forEach>
                        <li class="topborder"><a href="${pageContext.request.contextPath}/home/company/mail_box.action">Check all messages <i class="fa fa-angle-right"></i></a></li>
                    </ul>
                </li>
                <% } %>
            </ul>
            <script>
                $("span.menu").click(function(){
                    $(" ul.nav").slideToggle("slow" , function(){
                    });
                });
            </script>
        </div>
        <!--在这里添加菜单-->
        <div class="clearfix"> </div>

    </div>
</div>
